﻿using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;

namespace EDMDesigner.Designer.BindingConverter
{
    public class BoolToFontWeightConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if ((bool)value)
                return FontWeights.Bold;
            return FontWeights.Normal;
        }
        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return (FontWeight)value == FontWeights.Bold;
        }
    }
}
